<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>金币管理-进出列表</title>
<script type="text/javascript"
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<style>
body {
	margin: 0;
	padding: 0;
	background: white;
}

input {
	height: 25px;
	font-size: 18px;
	width: 100px;
}

.pink {
	background: #FFCCCC;
}

.red {
	color: red;
}
.yellow {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#FFFF66 none repeat scroll 0 0;
}
</style>

</head>
<body>
<form action="" method="post"><select name="tbl">
<?php foreach($tables as $tbl):?>
	<option value="<?php echo $tbl ?>"><?php echo $tbl ?></option>
	<?php endforeach;?>
</select> <input type="submit" /></form>
<hr />

<table style='width: 680px; margin: 5px auto auto 50px;' id="playa" class="table">
	<tr>
		<th>房间</th>
		<th>局id</th>
		<th>类型</th>
		<th>该局钱数</th>
		<th>当前总钱数</th>
		<th>时间</th>
	</tr>
	<?php foreach($data as $list) :?>
	<tr id="<?php echo $list['ltid']?>" <?php if($list['turnmoney']>0): ?>class="pink"<?php endif ?>>
		<td><a href="?account-get_tablelog_detail_summry?uid=<?php echo $uid ?>&ltid=<?php echo $list['ltid'] ?>&tbl_lm=<?php echo $tbl_name ?>" target="detail_frm" ><?php echo $list['tid']?>号房间</a></td>
		<td><a href="?account-get_tablelog_detail_all?uid=<?php echo $uid ?>&ltid=<?php echo $list['ltid'] ?>&tbl_lm=<?php echo $tbl_name ?>" target="detail_frm" >局<?php echo $list['ltid']?></a></td>
		<td><?php echo $list['turnmoney']==0 ? '平' : ( $list['turnmoney']>0 ? '赢' : '输' ) ?></td>
		<td><?php echo $list['turnmoney']?></td>
		<td><?php echo $list['curmoney']?></td>
		<td ><?php echo date('Y-m-d', $list['time']) ?>&nbsp;<span style='color:blue'><?php echo date('H:i', $list['time']) ?></span></td>
    </tr>
    <?php endforeach; ?>
</table>

<input type=button onclick="N(-1)" value="上一页">
<input type=button onclick="N(1)" value="下一页">

<div id="nd" style="position: absolute; right: 10px; top: 10px; border: 2px solid #333; width: 450px; height: 680px; background-color: #fff; padding: 10px;">
<iframe id="detail_frm" name="detail_frm" width="100%" height="100%" frameborder="0"></iframe>
</div>

<script>

var pagesize=30,pagecount=1,pageLen;
var obj,j;
onload=function(){
    obj=document.getElementById('playa').getElementsByTagName("tr");
    j=obj.length;
    pageLen=Math.ceil(j/pagesize);
    N(0);
};
function resetStyle(){
    for (var i=1;i<j;i++)obj[i].style.display="none";
}
function N(k){
    if (k>0 && pagecount>=pageLen ||k<0 && pagecount<=1)return;
    pagecount+=k;
    resetStyle();
    for (var i=(pagecount-1)*pagesize+1;i<=pagecount*pagesize;i++)if (obj[i])obj[i].style.display="";
}

function R(a) {
    return typeof a=="string"?document.getElementById(a):a;
  }

var w=window,d=document;
var nd = 'nd';

w.setInterval(function(){
	if(R(nd)) {
	    var xtop = Math.max(d.body.scrollTop, d.documentElement.scrollTop);
	    R(nd).style.top = ( xtop + 8 ) + 'px';
	}
}, 10);
</script>

<!-- <?php print_r($url) ?> -->
</body>
</html>

